// 定义变量
@font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
@bg-color: #f5f5f5;
@primary-color: #4a90e2;
@primary-hover: #357abD;
@text-color: #333;
@label-color: #555;
@border-color: #ddd;
@shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
@success-bg: #d4edda;
@success-text: #155724;
@error-bg: #f8d7da;
@error-text: #721c24;

// 通用混合器
.transition(@property: all, @duration: 0.3s) {
  transition: @property @duration ease;
}

// 结构嵌套
body {
  // 插入背景图片
  background-image: url('./assets/bg.jpg') no-repeat center/cover;
  background-size: cover;
  font-family: @font-family;
  background-color: @bg-color;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin: 0;

  .login-container {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: @shadow;
    width: 350px;
    text-align: center;

    h2 {
      color: @text-color;
      margin-bottom: 25px;
    }

    .input-group {
      margin-bottom: 20px;
      text-align: left;

      label {
        display: block;
        margin-bottom: 8px;
        color: @label-color;
        font-weight: 500;
      }

      input[type="text"],
      input[type="password"] {
        width: 100%;
        padding: 12px;
        border: 1px solid @border-color;
        border-radius: 5px;
        font-size: 16px;
        .transition(border-color);

        &:focus {
          border-color: @primary-color;
          outline: none;
          box-shadow: 0 0 0 2px fade(@primary-color, 20%);
        }
      }
    }

    .login-btn {
      width: 100%;
      padding: 12px;
      background-color: @primary-color;
      color: white;
      border: none;
      border-radius: 5px;
      font-size: 16px;
      cursor: pointer;
      .transition(background-color);

      &:hover {
        background-color: @primary-hover;
      }
    }

    .message {
      margin-top: 20px;
      padding: 10px;
      border-radius: 5px;
      font-size: 14px;
      display: none;

      &.success {
        background-color: @success-bg;
        color: @success-text;
        display: block;
      }

      &.error {
        background-color: @error-bg;
        color: @error-text;
        display: block;
      }
    }
  }
}
#son{
  color:green;
}
